<style>
    .ciw{width: 250px}
</style>
<shiro:hasPermission name="attendance:selfData:add">
<div data-id="content" class="box_tc_s" style="height: auto">
    <form data-id="form-attendance-add-info" method="post"
          action="${pageContext.request.contextPath}/app/api/attendance/add">
        <table border="0" cellpadding="0" cellspacing="0" class="hydra-table">
            <tr>
                <td class="hydra-left width90"><span class="nes-tip">*</span>考勤事由：</td>
                <td class="hydra-right">
                    <select data-id="reason" name="reason.id" data-options="required:true,editable: false"
                            class="easyui-validatebox hydra-input-width ciw"></select>
                </td>
                <td class="hydra-left width90"><span class="nes-tip">*</span>人员：</td>
                <td class="hydra-right">
                    <input type="hidden" name="applyUser.id" value="${loginUser.id}" data-id="loginUserId">
                    <div data-id="select1">
                        <select data-id="applyUser1" name="applyUser.id" data-options="required:true,editable: false"
                                class="easyui-validatebox hydra-input-width ciw"></select>
                    </div>
                    <div data-id="select2" style="display: none">
                        <select data-id="applyUser2" name="applyUser.id" data-options="required:true,editable: false"
                                class="easyui-validatebox hydra-input-width ciw"></select>
                    </div>
                </td>
                <td class="hydra-left width90"><span class="nes-tip">*</span>开始时间：</td>
                <td class="hydra-right">
                    <div data-id="hourBegin">
                        <input type="text" class="hydra-input-width ciw" data-id="beginTime"
                               name="beginTime" data-options="required:true,editable: false"/>
                    </div>
                    <div data-id="dayBegin" style="display: none">
                        <input type="text" class="hydra-input-width" data-id="beginTime1" style="width: 180px"
                               value='<fmt:formatDate value="${now}" pattern="yyyy-MM-dd"/>'
                               name="beginTime1" data-options="required:true,editable: false"/>
                        <select data-id="apm"  name="apm" class="hydra-input-width" style="width: 70px">
                            <option value="am">上午</option>
                            <option value="pm">下午</option>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <%--<td class="hydra-left width90" data-id="pCodeItem" style="display: none">--%>
                    <%--<span class="nes-tip">*</span>项目代号：--%>
                <%--</td>--%>
                <%--<td class="hydra-right" data-id="pCodeItem" style="display: none">--%>
                    <%--<input type="text" name="projectCode" data-id="projectCode"--%>
                           <%--class="easyui-validatebox hydra-input-width ciw"--%>
                           <%--data-options="required:true,validType:['normalChar','length[0,20]']"--%>
                           <%--placeholder="项目代号.." />--%>
                <%--</td>--%>
                <td class="hydra-left width90"><span class="nes-tip">*</span>备注：</td>
                <td class="hydra-right"><textarea
                        data-id="remark" name="remark"
                        class="easyui-validatebox hydra-textarea hydra-input-width ciw" draggable="false"
                        data-options="required:true,validType:['normalChar','length[0,200]']"
                        placeholder="备注.."></textarea></td>
                <td class="hydra-left width90">
                    <input type="checkbox" data-id="isReplace" name="isReplace" value="1"/>
                </td>
                <td class="hydra-right">
                    代为填写
                    <a data-id="next" href="javascript:void(0)" iconCls="fa fa-check fa-lg" style="margin-left: 100px">提交</a>
                </td>
                <td colspan="2">
                    <span data-id="prompt" style="color: red"></span>
                </td>
            </tr>
        </table>
    </form>
</div>
</shiro:hasPermission>
<div class="grid-wrap">
    <table data-id="grid"></table>
</div>
<div data-id="nsdb" style="padding: 5px; height: auto">
    <shiro:hasPermission name="attendance:selfData:add">
        <a data-href="${pageContext.request.contextPath}/app/api/attendance/toAdd" data-key="add" iconCls="fa fa-plus fa-lg" plain="true">新增</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="attendance:selfData:del">
        <a data-href="${pageContext.request.contextPath}/app/api/attendance/delete" data-key="del" iconCls="fa fa-trash fa-lg" plain="true">删除</a>
    </shiro:hasPermission>
        <a data-href="${pageContext.request.contextPath}/app/api/attendance/toSearch" data-key="search" iconCls="fa fa-search fa-lg" plain="true">搜索</a>
        <a data-href="#" data-key="search_all" iconCls="fa fa-refresh fa-lg" plain="true">搜索全部</a>
</div>
<div data-id="attendance_tempate">
    <shiro:hasPermission name="attendance:selfData:edit">
        <a data-href="${pageContext.request.contextPath}/app/api/attendance/toEndTime" data-id="{{id}}" data-key="edit" iconCls="fa fa-calendar-check-o fa-lg" plain="true">编辑结束时间</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="attendance:selfData:editAll">
        <a data-href="${pageContext.request.contextPath}/app/api/attendance/toUpdate" data-id="{{id}}" data-key="edit" iconCls="fa fa-edit fa-lg" plain="true">编辑</a>
    </shiro:hasPermission>
    <a data-href="${pageContext.request.contextPath}/app/api/attendance/toUpdate" data-id="{{id}}" data-key="reply" iconCls="fa fa-reply fa-lg" plain="true">再次提交</a>
    <a data-href="${pageContext.request.contextPath}/app/api/attendance/toView" data-id="{{id}}" data-key="view" iconCls="fa fa-eye fa-lg" plain="true">查看详情</a>
</div>